#include <iostream>
using namespace std;


class Base
{
public:
	Base()
	{
		cout << "Base()" << endl;
	}

	~Base()
	{
		cout << "~Base()" << endl;
	}
};


class Derived : public Base
{
public:
	Derived()
	{
		cout << "Derived()" << endl;
	}

	void Debug() const
	{
		std::cout << x << std::endl;
		/*x += 10; // error
		std::cout << x << std::endl;*/
	}

	~Derived()
	{
		cout << "~Derived()" << endl;
	}
private:
	int x = 10;
};

int main()
{
	Derived d;
	return 0;
}